﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace TasksModel
{
    [System.Xml.Serialization.XmlRootAttribute(Namespace = "http://mp.tasks.com/2010/")]
    public class TaskAuthor : NamedObject
    {
        public string UriSchema
        {
            [System.Diagnostics.DebuggerStepThrough]
            get { return BaseSchema + "author"; }
        }

        #region Constructors

        public TaskAuthor(Guid id)
        {
            ID = id;
        }

        public TaskAuthor()
            : this(Guid.NewGuid())
        {
        }

        /// <summary>
        /// Deep copy. Does not copy events.
        /// </summary>
        public TaskAuthor(TaskAuthor ta)
            : this(ta.ID)
        {
            Name = ta.Name;
            Timestamp = ta.Timestamp;
        }

        public TaskAuthor(string name)
            : this()
        {
            Name = name;
        }

        #endregion
    }
}